From 2c23546ba90ff1a44789e9281d8fc952f0b40af5 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 25 Apr 2020 00:09:41 +0200 Subject: [PATCH] gtktexthandle: Set parent through API call The GtkWidget::parent property went readonly, use the API call to ensure the text handle has a parent set. --- gtk/gtktexthandle.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index c38c3c08b5..fda579ca52 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -459,10 +459,14 @@ gtk_text_handle_init (GtkTextHandle *widget) GtkTextHandle * gtk_text_handle_new (GtkWidget *parent) { - return g_object_new (GTK_TYPE_TEXT_HANDLE, - "parent", parent, - "css-name", I_("cursor-handle"), - NULL); + GtkTextHandle *handle; + + handle = g_object_new (GTK_TYPE_TEXT_HANDLE, + "css-name", I_("cursor-handle"), + NULL); + gtk_widget_set_parent (GTK_WIDGET (handle), parent); + + return handle; } void -- 2.30.2